﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Un4seen.Bass;

// SDD# - Software Defined Devices in C# for Linux and Windows
// Misc audio related objects
// (c) 2014-2015 Chris Burri. MIT License applies. 
// See http://niston.wordpress.com

namespace sdd.subsystems.audio
{
    public class AudioLevels
    {
        public int Left { private set; get; }
        public int Right { private set; get; }


        public AudioLevels()
        {
            Left = 0;
            Right = 0;
        }

        public AudioLevels(int bassLevel)
        {
            Left = Utils.LowWord32(bassLevel);
            Right = Utils.HighWord32(bassLevel);
        }

        public AudioLevels(int left, int right)
        {
            Left = left;
            Right = right;
        }
    }

    public class BASSException : Exception
    {
        public BASSException()
        {
            BassErrorCode = (int)Bass.BASS_ErrorGetCode();
            BassErrorText = Bass.BASS_ErrorGetCode().ToString();
        }
        public int BassErrorCode { get; private set;}
        public string BassErrorText { get; private set; }
    }

}
